<?xml version="1.0" encoding="windows-1251"?>
<!DOCTYPE hrc PUBLIC "-//Cail Lomecb//DTD Colorer HRC take5//EN"
  "http://colorer.sf.net/2003/hrc.dtd">

<hrc version="take5" xmlns="http://colorer.sf.net/2003/hrc"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://colorer.sf.net/2003/hrc http://colorer.sf.net/2003/hrc.xsd"
 >


<type name="far.macrolib">
<annotation>
 <contributors>
   Maxim Rusov
 </contributors>
</annotation>


<import type="def"/>

<region name="mKeyWord" parent="Keyword"/>
<region name="mParam" parent="FunctionKeyword"/>

<scheme name="far.macrolib">

  <regexp match="/;;.*?$/" region="Comment"/>
  <regexp match="/\/\/.*?$/" region="Comment"/>
  <block start="/\/\*/" end="/\*\//" scheme="Comment" region="Comment" region00="PairStart" region10="PairEnd"/>

  <keywords region="mKeyWord" ignorecase="yes">
     <word name="macro"/>
     <word name="farmacro"/>
     <word name="$macro"/>
     <word name="const"/>
     <word name="include"/>
  </keywords>    

  <keywords region="mParam" ignorecase="yes">
     <word name="name"/>
     <word name="descr"/>
     <word name="description"/>
     <word name="area"/>
     <word name="areas"/>
     <word name="bind"/>
     <word name="key"/>
     <word name="keys"/>
     <word name="hotkey"/>
     <word name="hotkeys"/>
     <word name="event"/>
     <word name="events"/>
     <word name="cond"/>
     <word name="condition"/>
     <word name="priority"/>
     <word name="EatOnRun"/>
     <word name="RunOnRelease"/>
     <word name="DisableOutput"/>
     <word name="SendToPlugin"/>
  </keywords>

  <block start="/(\{\{)/" end="/(\}\})/" scheme="body" 
    region00="Symbol" region01="PairStart" 
    region10="Symbol" region11="PairEnd"
   />

  <regexp match="/\b0x[\dA-Fa-f]+\b/" region="NumberHex"/>
  <regexp match="/\b\d+\b/" region="NumberDec"/>

  <inherit scheme="far:macro.string"/>

<!--  <regexp match="/\S{1,}/" region="Error" priority="low"/>	-->

</scheme>


<scheme name="body">
  <inherit scheme="macro.sequense"/>
</scheme>



<scheme name="macro.sequense">

  <block start="/(\$(Rep|While|If)\b)\s*/i" end="/(\$End\b)/i"
	scheme="macro.sequense" 
	region00="far:command" region01="PairStart"
	region10="far:command" region11="PairEnd"
  />

  <regexp match="/\$Continue/i" region="far:command"/>  

  <block start="/\$\M\w+/" end="/~\w+\b\m/" 
    priority="low"
	scheme="far:macro.command.names" 
	region00="far:command"
  />

  <!-- vars -->
  <block start="/(\%{1,2}[\w\._]+)\s*(=)/" end="/;/" 
    scheme="macro.expr"
	region01="far:var" region02="far:oper" region10="far:struct"
  />

  <inherit scheme="macro.expr"/>	
</scheme>



<scheme name="macro.expr">

  <regexp match="/;;.*?$/" region="Comment"/>
  <regexp match="/\/\/.*?$/" region="Comment"/>
  <block start="/\/\*/" end="/\*\//" scheme="Comment" region="Comment" region00="PairStart" region10="PairEnd"/>

  <regexp match="/#AKey/i" region="far:command"/>  

  <block start="/(\()/" end="/(\))/" 
    scheme="macro.expr"
	region00="far:oper" region01="PairStart"
	region10="far:oper" region11="PairEnd"
  />

 <inherit scheme="far:macro.expr"/> 
</scheme>


</type>
</hrc>
